# -*- coding: utf-8 -*-

class CDTCaret(object):
    def __init__(self):
        self.period = 500
        
class CDTEditor(object):
    def __init__(self, parent):
        self._caret = CDTCaret()
        self._widget = parent
        self._stylesValid = False
    
    def refreshStyle(self):
        if not self._stylesValid:
            self._stylesValid = True
            # TODO : do refresh
                
    def refreshGraphics(self, bg):
        pass
        
    def paint(self, bg, clientRect):
        self.refreshStyle()
        self.refreshGraphics(bg)
        # TODO: do paint
        
    def repaint(self):
        self._widget.update()